Docker is an open platform for developing, shipping, and running applications. At its core, Docker provides a way to run almost any application securely isolated in a container. A container may consist of an application, user-added files, and metadata for an application. Each container is built from an image, which may specify what the container holds, what process to run when the container is launched, and a variety of other configuration data. The image is a read-only template from which the container is launched. The image may consist of a series of layers. When an image needs to be changed (for example, an application needs to be updated to a new version), a new layer may get built. Rather than replacing or entirely rebuilding the whole image as may be done with a virtual machine, only that layer needs to be added or updated.
An image may start from a base image, such as a base Ubuntu image or a base Fedora image. Further, images generated for one container can be used as the basis for new images for another container. For example, if a base Apache image has been generated, it can be used as the base image for all web applications. An image can be built from these base images using a set of instructions, each of which creates a new layer in the image. However, because these layers within the image are overlays in a single inheritance tree, duplicated layers may be inevitably introduced while the image is being built. In addition, such layer duplication cannot be eliminated simply by writing the set of instructions carefully or merging multiple layers into one layer. Similar problems exist for other containerization technologies such as Chroot, Linux-VServer, LXC, and so on.